package bishi.day35_6_3;

import java.util.*;

/**
 * @author 是阿秋啊
 * @date 2022/06/04 14:50
 **/
public class 抄送列表 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.nextLine();
            String name = sc.nextLine();
            if (!str.contains("\"")) {
                if (str.contains(name)) {
                    System.out.println("Ignore");
                } else {
                    System.out.println("Important!");
                }
            } else {
                int len = str.length();
                int i = 0;
                int j = 0;
                while (i < len) {
                    j = i;
                    if (str.charAt(i) == '"') {
                        j++;
                        while (j < len && str.charAt(j) != '"') {
                            j++;
                        }
                        String tmp = str.substring(i + 1, j);
                        if (name.equals(tmp)) {
                            System.out.println("Ignore");
                            break;
                        }
                        i = j + 1;
                    } else if (str.charAt(i) == ',') {
                        j++;
                        if (str.charAt(j) == '"') {
                            i = j;
                            continue;
                        }
                        while (j < len && str.charAt(j) != ',') {
                            j++;
                        }
                        String tmp = str.substring(i + 1, j);
                        if (name.equals(tmp)) {
                            System.out.println("Ignore");
                            break;
                        }
                        i = j + 1;
                    } else {
                        while (j < len && str.charAt(j) != ',') {
                            j++;
                        }
                        String tmp = str.substring(i, j);
                        if (name.equals(tmp)) {
                            System.out.println("Ignore");
                            break;
                        }
                        i = j + 1;
                    }
                }
                if (i >= len) {
                    System.out.println("Important!");
                }
            }
        }
    }
}